package nettypro.nio;

import java.nio.ByteBuffer;

/**
 * @ClassName ReadOnlyBuffer
 * @Description TODO
 * @Author zeny
 * @Date 2020/3/22 0022 10:16
 */
public class ReadOnlyBuffer {
    public static void main(String[] args) {
        ByteBuffer byteBuffer = ByteBuffer.allocate(64);
        for (int i = 0; i < 64; i++) {
            byteBuffer.put((byte)i);
        }
        byteBuffer.asReadOnlyBuffer();
    }
}
